Page({
    data: {
        isLoggedIn: false,
    },

    onLoad: function () {
        const isLoggedIn = wx.getStorageSync('isLoggedIn');
        this.setData({
            isLoggedIn,
        });
    },
    // 跳转到发布商品
    goAddGood() {
        if (!this.data.isLoggedIn) {
            this.goToLogin();
            return;
        }
        wx.navigateTo({
            url: '/pages/addGood/addGood'
        });
    },
    // 跳转到盲盒衍生品
    goAddDerivative() {
        if (!this.data.isLoggedIn) {
            this.goToLogin();
            return;
        }
        wx.navigateTo({
            url: '/pages/addDerivative/addDerivative'
        });
    },

});